local _M = {}

_M._VERSION = '0.01'

local mt = { __index = _M }

-- 检查是否文件夹
function _M.isDir(p)
  if os.execute("cd " .. p .. " >nul 2>nul") then
    return true
  else
    return false
  end
  -- return getType(p) == "directory"
end

-- 检查文件或目录是否存在
function _M.exFile(p)
  local f = io.open(p, "rb")
  if f then f:close() end
  return f ~= nil
end

-- 检查文件或目录是否存在
function _M.createDir(p)
  if os.execute("mkdir -p " .. p .. " >nul 2>nul") then
    return true
  else
    return false
  end
end

return _M
